Method apparatus and computer program product for interactive surveying

ABSTRACT

A survey document is provided on a server, for delivery to a client on a network, having questions and potential answers in a format defining branches of the questions. Programming instructions are also provided on the server for delivery to the client on the network. The instructions are for causing the client to render questions on a user interface from the survey document. The questions initially rendered include a first one of the questions. The instructions are also for causing the client to branch to and render on the user interface second or third ones of the questions responsive to the survey document and an answer received for the first question.

BACKGROUND

[0001] 1. Field of the Invention

[0002] This invention concerns a method, apparatus and computer program product relating to delivering survey questions, and more particularly to delivering on-line surveys that dynamically present questions responsive to answers received.

[0003] 2. Related Art

[0004] On-line surveys suffer from some problems. First, they are not interactive. That is, conventionally all possible questions are displayed in a survey form, irrespective of answers that a user gives when filling out the form. Therefore, even if a certain answer precludes a certain following set of questions, the certain questions are still displayed after the user selects the certain answer. Also, on-line survey forms are conventionally created individually, one-by-one. That is, the survey exists on a server as a collection of (possibly numerous) forms, each for individual delivery to a client. It is problematic that if a new question has to be added to the survey its addition may affect many or even all the existing survey forms, so that may or all the forms have to be modified. Therefore, a need exists for improvements in delivery and handling of surveys.

SUMMARY OF THE INVENTION

[0005] The foregoing need is addressed in the present invention by providing a survey document on a server for delivery to a client on a network having questions and potential answers in a format defining branches of the questions. That is, the format defines whether a first one of the questions branches to a second one of the questions, or instead to a third one of the questions, and so on, depending on an answer for the first question.

[0006] According to one aspect, the format of the survey document defines the questions and answers as data elements that are included in the survey document as strings of text surrounded by text markups, including tags. The text markups describe the data elements. The question branches are defined by the markups as associations among the data elements. In one embodiment, the format is an extensible markup language format.

[0007] In another aspect, programming instructions, such as in a Java applet associated with an HTML document, are provided for delivery to the client on the network. The instructions are for causing the client to render questions on a user interface from the survey document. The questions initially rendered include the first one of the questions. The instructions are also for causing the client to branch to and render on the user interface the second or third one of the questions responsive to the survey document and an answer received for the first question.

[0008] It is advantageous that the programming instructions and survey document provide the ability to branch based on a previous answer, according to which the survey will display new sub-questions (and potential answers) for the newly answered question, depending on the answer given. Moreover, first sub-questions can themselves branch to second sub-questions, which can branch to third sub-questions, and so on.

[0009] It is also advantageous that the survey document resides in the above described form on the server because the single survey document may be easily revised, without having to revise numerous forms on the server. Then the applet, running on a client's browser, for example, will render the survey in browser frames.

[0010] In another aspect, the programming instructions include instructions for causing the client to parse the data elements from the survey document into data arrays. The data arrays include cross-references defining associations among questions and answers. The arrays provide an efficient data structure by which the applet can follow a chain of cross references and compile, for adding to the survey, branches of sub-questions for particular answers received from a user.

[0011] In yet another aspect, a data type definition file is also provided for delivery to the client on the network. According to this aspect, the programming instructions include instructions for causing the client to validate the data elements responsive to the document type definition file.

[0012] In a still further aspect, the programming instructions include instructions for causing the client to return the survey results to the server as a document defining the answers as data elements that are included in the survey document as strings of text surrounded by text markups, including tags. The text markups describe the data elements. This is advantageous because this document format is widely known and well supported, so that it permits the survey results to be interpreted and manipulated by a wide variety of applications.

[0013] Other objects and advantages of the invention will become apparent upon reading the following detailed description and upon reference to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0014]FIG. 1 illustrates a computer system that is generally applicable for an embodiment of the invention, and networking aspects of the present invention in the context of the World Wide Web, according to an embodiment of the invention.

[0015]FIG. 2 illustrates structure of an XML document providing survey questions and answers, according to an embodiment of the invention.

[0016]FIG. 3 illustrates structure of arrays created on a client responsive to the XML document by Java functions that exist within an applet, according to an embodiment of the invention.

[0017]FIG. 4 illustrates initial survey questions and answers shown in a frame displayed in a window of a browser by the client, according to an embodiment of the invention.

[0018]FIG. 5 illustrates the frame for an instance where the user has selected a certain set of answers, according to an embodiment of the invention.

[0019]FIG. 6 illustrates the frame for an instance where the user has selected a different set of answers, according to an embodiment of the invention.

[0020]FIG. 7 illustrates the frame for an instance where the user has selected yet another set of answers, according to an embodiment of the invention.

[0021]FIG. 8 illustrates, in a flow chart form, certain steps or instructions of the invention, according to an embodiment.

DETAILED DESCRIPTION OF THE INVENTION

[0022] The claims at the end of this application set out novel features which applicants believe are characteristic of the invention. The invention, a preferred mode of use, further objectives and advantages, will best be understood by reference to the following detailed description of an illustrative embodiment read in conjunction with the accompanying drawings.

[0023] Referring now to FIG. 1, aspects of an embodiment of the present invention are illustrated in the context of the World Wide Web, an open community of hypertext-enabled document servers and readers on the Internet. That is, client 150 is connected to a server 110 by a network 140, so that the client 150 can obtain web pages, such as hypertext markup language (“HTML”) document 131, data type definitions (“DTD's), such as DTD document 132, and data, such as extensible markup language (“XML”) document 133 from the server 110, which has CPU's 106. In the embodiment shown, the pages are stored by the server 110 in a first storage unit 115, and copies are delivered to the client's storage unit 175. The client 150 executes a browser 160 program on its CPU 155, for rendering an image of the HTML document 131 in a frame 135 of browser window 165 on the client's display 170, which is a type of user interface. The client 150 of the embodiment depicted includes user input devices keyboard 152 and mouse 154.

[0024] The HTML document 131 includes an applet 120, which has instructions in a Java format. (Java is a trademark of Sun Microsystems, Inc.) The Java applet is a non-standalone application in Java code that runs inside a browser such as browser 160. Among other aspects, Java is an object oriented, interpreted, dynamic programming language. This means that data and methods that operate on that data are collected as classes. The classes describe the state and behavior of respective objects and are arranged in a hierarchy so a subclass can inherit behavior from its superclass. Being an interpreted language, the Java applet is compiled as byte codes for a Java virtual machine, rather than native machine code. In this manner the applet is less platform dependent, since the applet can run on any platform to which the Java virtual machine has been ported. Being dynamic, classes of the applet 120 can be loaded into a running Java interpreter at anytime and then dynamically instantiated.

[0025] XML is a hierarchical data format, according to which data elements can be nested within other data elements and can have associated attributes. The XML document 133 in this embodiment is a survey document in which survey questions and answers are defined as XML data elements. That is, the XML file contains all the survey questions along with information about what type of answers are expected and if the answers are dependent on previous answers to previous questions. The questions and answers are included in the survey XML document 133 as strings of text surrounded by text markups, including tags that describe the data elements, and attributes that define associations among the data elements, e.g., questions and answers. These association define, among other things, question branches, which will be described further in connection with FIG. 2 hereinbelow.

[0026] The DTD document 132 defines what elements may appear in the XML document 133, and defines contents and attributes for the elements. The applet 120 has Java functions 122 that parse data elements of the XML document 133 into a number of data arrays 126 stored in the client 150 memory 157, which will be described further in connection with FIG. 3 hereinbelow. In connection with parsing the XML document 133, the Java functions 122 validate the data in the XML document 133 responsive to the DTD document 132. Validating operates on the principle that everything not defined in the DTD document 132 is forbidden. That is, everything in the XML document 133 must match a declaration in the DTD document 132.

[0027] Responsive to receiving user inputted survey answers the applet 120 updates the survey data, creating a document object model (“DOM”) data structure 124 in memory 157. Then the applet 120 creates a responding XML document 128 in memory 157. The responding XML document 128 is for survey results and includes the user inputted answers. The responding XML document 128 is then sent back to the server 110.

[0028] Referring now to FIG. 2, the structure of XML document 133 is illustrated figuratively, according to an embodiment. The root node 210 is a data element defining the document 133 as a survey document. The document 133 defines questions and answers for a survey. In the illustrated embodiment, the survey relates to hardware and software development. Branching from the root node 210 are nodes 212, 214, 216, and 218, which are data elements defining categories of the survey questions and answers. Node 212 defines a category of questions and answers relating to a site description. Node 214 defines a category of questions and answers relating to products. Node 216 defines a category of questions and answers relating to equipment profile s. Node 218 defines a category of questions and answers relating to software.

[0029] The questions and answers for each of these categories 212 through 218 are for displaying in respective frames of the browser window 165 (FIG. 1). According to the embodiment, each of the categories has a number of questions and answers; however, for the illustration only questions and answers for the software category node 218 are shown. Moreover, only selected ones of the questions and answers for the software category are shown for the illustration. Branching from node 218 is a heading node 230 which indicates that sub-questions thereunder relate to processors.

[0030] Associated with the processor heading is a first row 232 and a second row 234 of questions and answers. The question 236 for the first row 232 is “architecture's supported?” The first possible answer 238 is “Power PC.” The second possible answer 240 is “X86.” The third possible answer 242 is “68K.” All the possible answers for question 236 are check boxes. The question 244 for the second row 234 is “Browser used most?” The answer 246 is a text box, in which the client 150 (FIG. 1) user may enter text.

[0031] One of the answers, answer 238, branches to a row 248 of sub-questions and answers. That is, answer 238 has associated with it the row 248 of sub-questions and answers. The first sub-question 250 is “Is the chip an IBM designed chip?” The first possible answer 252 to this question 250 is a radio button representing “yes.” The second possible answer 254 to this question 250 is a radio button representing “No.”

[0032] There are two rows 256 and 258 of questions and answers associated with the answer 252 “Yes.” There is one row 258 of questions and answers associated with the answer 254 “No.” The question 260 for the first row 256 is “What is the name of it?” The associated answer 262 is a text box. The question 264 for the second row 258 is “What is its speed?” The associated answer 266 is a text box.

[0033] Referring now to FIG. 3, the structure of arrays 126 are illustrated, according to an embodiment. The arrays 126 are data structures created responsive to the XML document 133 (FIGS. 1 and 2) by the Java functions 122 (FIG. 1) that exist in memory 157 (FIG. 1) accessible by the applet 120 (FIG. 1). Array 310 is the first one of the arrays 126 and has all the headings, questions and potential answers that are initially displayed in a frame of the browser 160 (FIG. 1) for the software category 218 (FIG. 2). A portion of the array 310 constitutes a hash table which points to additional questions and answers which may also be added to the initial questions and answers in the frame, depending on which answers a user selects. That is, in hash table convention, answers constitute keys with associated cross references to other arrays. For example, for question 236, answer 238 “Power PC” has an associated cross reference which points to array 320, that includes a sub-question 250 and answers 252 and 254 for adding to the frame responsive to the user selecting the answer “Power PC” for question 236. Answer 252 is a key that points to arrays 330 and 340. answer 254 is a key that points to array 340. Array 330 includes a sub-question 260 and sub-answer 262. Array 340 includes a sub-question 264 and sub-answer 266.

[0034] Referring now to FIGS. 3 and 4 together, initial questions and answers, i.e., questions 236 and 244 and answers 238, 240, 242 and 246 of array 310 (FIG. 3), are shown in a frame 400 (FIG. 4) displayed in a window 165 (FIG. 1) of the browser 160 (FIG. 1). That is, heading 230 is rendered immediately below the displayed category 218 of questions and answers. Immediately below the heading 230 are two rows of questions and answers. In the first row is question 236 followed by answers 238, 240, and 242 which the user may select. In the second row is question 244 followed by the text box answer 246 in which the user may enter text.

[0035] Referring now to FIGS. 3 and 6 together, the frame 400 (FIG. 6) is shown for an instance where the user has selected answer 238 and has also selected answer 254 (instead of answer 252). Since answer 254 cross references only the questions and answers in array 340 (FIG. 3), but not those in array 330 (FIG. 3), in this instance of the frame 400 the question 264 and answer 266 in array 340 are rendered in addition to the initial questions and answers in array 310, but question 260 and answer 262 in array 330 are not.

[0036] Referring now to FIGS. 3 and 5 together, the frame 400 (FIG. 5) is shown for an instance where the user has selected answer 238. Answer 238 in array 310 (FIG. 3) cross references questions and answers in array 320. Therefore, in addition to the initial questions and answers in array 310 the question 250 and answers 252 and 254 in array 320 are displayed in the frame 400 in the instance illustrated in FIG. 5. Also, according to the embodiment, the first possible answer 252 to question 250 in array 320 is assumed to be the default answer. Answer 252 cross references questions and answers in both arrays 330 and 340, that is, questions 260 and 264 and answers 262 and 266. Therefore, both sets of the questions and answers for arrays 330 and 340 are also displayed in the frame 400 in this instance.

[0037] Thus, FIG. 6 illustrates Java functions 122 branching from question 250 to question 264 (and its answer) for rendering by the browser 160 responsive to the user selecting answer 254; whereas FIG. 5 illustrates Java functions 122 branching from question 250 to not only sub-question 264 (and its text box for an answer), but also to sub-question 260 (and its text box for an answer) responsive to the user selecting answer 252. It should be understood that in another embodiment question 250 could branch to question 264 responsive to answer 254, and alternatively branch instead solely to question 260 responsive to answer 252. That is, in this other embodiment, whether the first question, question 250, branches to a second one of the questions, question 260, or instead to a third one of the questions, question 264, depends on the answer received for the first question, question 250.

[0038] Referring now to FIGS. 3 and 7 together, the frame 400 is shown in FIG. 7 for an instance where the user has selected answer 240 instead of answer 238. Since answer 240 does not cross reference any additional arrays, no questions and answers are rendered in addition to those of array 310 which were initially rendered, as was shown in the instance of frame 400 in FIG. 4.

[0039] Referring now to FIG. 8, an algorithm 800 is shown for certain methods steps of the invention, according to an embodiment. The methods steps of the algorithm 800 are performed by the client 150 (FIG. 1) responsive to the programming instructions of the applet 120, XML document 133 and DTD document 132 (FIG. 1) provided to the client 150 by the server 110 (FIG. 1). After beginning at step 810, the applet 120 reads and parses the XML document 133 in step 820. Then, in step 825 the data is validated against the DTD document 132. Next, in step 830, the applet 120 provides the selected questions and answers to the browser for rendering by the browser 160 in a frame 135 (FIG. 1) of the browser window 165 (FIG. 1). Next, in step 840, user input is gathered. Next, in step 845, if the user on the client 150 user quits, the applet 120 branches to step 880 in which the applet 120 saves the survey results, sending the previously mentioned responsive XML document 128 (FIG. 1) back to the server 110 and terminates at 885.

[0040] If the user has not quit, then at step 850 the applet 120 determines from the user's selections and text box entries whether an answer given leads to another branch of questions. This is done by the applet 120 looking at the entry for an answer in the hash table portion of one of the arrays 126 (FIGS. 1 and 3) containing the answer. If yes, then at step 860 the applet 120 follows the chain of cross references in the arrays 126 beginning with the entry for the answer, and thereby compiles, for adding to the survey, the branch of sub-questions for the answer. Then the applet 120 provides the user provided answers and compiled sub-questions to the browser for rendering at step 830. Alternatively, if the applet 120 determines that the user's answer does not lead to another branch of sub-questions, then the applet merely provides the user selected answers to the browser without any new sub-questions for rendering at step 830.

[0041] It is important to note that while the present invention has been described in the context of a fully functioning data processing system, those of ordinary skill in the art will appreciate that the processes of the present invention are capable of being distributed in the form of a computer readable medium of instructions in a variety of forms and that the present invention applies equally regardless of the particular type of signal bearing media actually used to carry out the distribution. Examples of computer readable media include RAM, flash memory, recordable-type media, such a floppy disk, a hard disk drive, a ROM, and CD-ROM, and transmission-type media such as digital and analog communications links, e.g., the Internet.

[0042] The description of the present embodiment has been presented for purposes of illustration, but is not intended to be exhaustive or to limit the invention to the form disclosed. Many additional aspects, modifications and variations are also contemplated and are intended to be encompassed within the scope of the following claims. For example, the embodiment has depicted the survey being rendered on a visual display device, but it should be understood that the survey could be rendered in other media, such as audio. It should also be understood that the client could take many forms, such says a desktop computer, laptop computer, notebook computer, personal digital assistant having a visual display and an audio player, or a more simple device having primarily, or even solely, an audio playback function. The client is depicted with a keyboard and mouse for user input, but other input devices are also contemplated, such as a microphone, for example. 

What is claimed is:
 1. A method for generating a survey for a client on a network, the method comprising the steps of: providing a survey document having questions and answers in a certain format for delivery to a client on a network, the format defining branches for the questions, wherein whether a first one of the questions branches to a second one of the questions or to a third one of the questions, depends on an answer for the first question; and providing instructions for delivery to the client on the network, which cause the client to display on a user interface certain ones of the questions, including the first one of the questions, and branch to and display on the user interface the second or third one of the questions responsive to an answer received for the first question.
 2. The method of claim 1, wherein according to the certain format of the survey document the questions and answers are defined as data elements included in the survey document as strings of text surrounded by text markups, including tags, that describe the data elements and wherein the question branches are defined as associations among the data elements.
 3. The method of claim 2, wherein the instructions comprise instructions for causing the client to parse the data elements from the survey document into data arrays having cross-references defining associations among questions and answers.
 4. The method of claim 2, comprising the step of: providing a data type definition file for delivery to the client on the network, wherein the instructions include instructions for causing the client validate the data elements responsive to the document type definition file.
 5. The method of claim 4, wherein the instructions are included in a document that includes information for displaying by a browser running on the client and directions for how the browser should display the information, and the instructions include instructions in an object oriented, interpreted, dynamic programming language.
 6. The method of claim 5 wherein the programming language includes Java.
 7. The method of claim 1, wherein the programming instructions include instructions for causing the client to return survey results to a server as a document defining the answers as data elements included in the survey document as strings of text surrounded by text markups, including tags, wherein the text markups describe the data elements.
 8. A computer program product for generating a survey for a client on a network, the computer program product comprising instructions for delivery to a client on a network, wherein the instructions are for causing the client to display on a user interface, responsive to a survey document, certain questions, including a first one of the questions, and branch to and display on the user interface second or third ones of the questions responsive to the survey document and an answer received for the first question, and wherein the survey document has questions and answers in a certain format defining branches of the questions, wherein whether the first one of the questions branches to the second one of the questions, or to the third one of the questions, depends on an answer for the first question.
 9. The computer program product of claim 8, wherein according to the certain format of the survey document the questions and answers are defined as data elements included in the survey document as strings of text surrounded by text markups, including tags, that describe the data elements and wherein the question branches are defined as associations among the data elements.
 10. The computer program product of claim 9, wherein the instructions comprise instructions for causing the client to parse the data elements from the survey document into data arrays having cross-references defining associations among questions and answers.
 11. The computer program product of claim 9, wherein the instructions include instructions for causing the client validate the data elements responsive to a document type definition file.
 12. The computer program product of claim 11, wherein the instructions are included in a document that includes information for displaying by a browser running on the client and directions for how the browser should display the information, and the instructions include instructions in an object oriented, interpreted, dynamic programming language.
 13. The computer program product of claim 12 wherein the programming language includes Java.
 14. The computer program product of claim 8, wherein the programming instructions include instructions for causing the client to return survey results to a server as a document defining the answers as data elements included in the survey document as strings of text surrounded by text markups, including tags, wherein the text markups describe the data elements.
 15. A server comprising: a processor for connecting to a network; a storage device coupled to the processor, wherein the storage device is for storing: a survey document having questions and answers in a certain format defining branches of the questions, wherein whether a first one of the questions branches to a second one of the questions, or instead to a third one of the questions, depends on an answer for the first question, and instructions for causing a client to display on a user interface, responsive to the survey document, certain questions, including the first one of the questions, and branch to and display on the user interface the second or third one of the questions responsive to the survey document and an answer received for the first question.
 16. The server of claim 15, wherein according to the certain format of the survey document the questions and answers are defined as data elements included in the survey document as strings of text surrounded by text markups, including tags, that describe the data elements and wherein the question branches are defined as associations among the data elements.
 17. The server of claim 16, wherein the instructions comprise instructions for causing the client to parse the data elements from the survey document into data arrays having cross-references defining associations among questions and answers.
 18. The server of claim 17, wherein the instructions include instructions for causing the client validate the data elements responsive to a document type definition file.
 19. The server of claim 18, wherein the instructions are included in a document that includes information for displaying by a browser running on the client and directions for how the browser should display the information, and the instructions include instructions in an object oriented, interpreted, dynamic programming language.
 20. The server of claim 19 wherein the programming language includes Java.
 21. The server of claim 15, wherein the programming instructions include instructions for causing the client to return survey results to the server as a document defining the answers as data elements included in the survey document as strings of text surrounded by text markups, including tags, wherein the text markups describe the data elements. 